package com.htu.courseService.exam.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.htu.courseService.exam.entity.Exam;
import com.htu.courseService.exam.vo.ExamDto;
import com.htu.courseService.exam.vo.ExamInfoDto;
import com.htu.courseService.exam.vo.QuestionDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExamMapper extends BaseMapper<Exam> {
    IPage<ExamInfoDto> getExamInfo(IPage<Exam> page, @Param("examTitle") String examTitle,
                                   @Param("nickName") String nickName);

    ExamDto selectDetail(@Param("examId") Integer examId);

    IPage<ExamInfoDto> getMyExamInfo(IPage<Exam> page, @Param("examTitle") String examTitle,
                                     @Param("nickName") String nickName,@Param("userId") Long userId);

    ExamDto getMyExamDetail(@Param("examId") Integer examId);

    List<QuestionDto> getMyAnswerList(@Param("id") Integer id);
}
